#include <iostream>
#include <cmath>
#define pai 3.1415926
#define lamuda0 546.1*1e-9

using namespace std;

class data
{
public:
    double a,b;
    double rad;
    void input()
    {
        cin>> a >> b;
        rad = (a+(b/60.0))*pai/180.0;
    }
};
int main()
{
    data ll[4],lr[4],rl[4],rr[4],f[4];
    for(int i=0;i<4;i++)
    {
        ll[i].input();
        lr[i].input();
        rl[i].input();
        rr[i].input();
        f[i].rad=(abs(rl[i].rad-ll[i].rad)+abs(rr[i].rad-lr[i].rad))/4;
        cout<<"rad["<<i<<"] = "<<f[i].rad<<endl;
    }
    double d=lamuda0/(sin(f[2].rad));
    cout<< "d = " <<d<<endl;
    double ufai=(2.0/60.0)*pai/180.0;
    cout<<"ufai = "<<ufai<<endl;
    double lamuda[4],ud[4];
    for(int i=0;i<4;i++)
    {
        if(i==2)
            continue;
        lamuda[i]=d*sin(f[i].rad);
        ud[i]=lamuda[i]*cos(f[i].rad)*ufai/sin(f[i].rad);
        cout<<"lamuda["<<i<<"] = "<<lamuda[i]<<endl;
        cout<<"ud["<<i<<"] = "<<ud[i]<<endl;
    }
    return 0;
}
